﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Text;
using Template.Infrastructure.EntityHistory;

namespace Template.Infrastructure.Dependency
{
    /// <summary>
    /// 生命周期字典
    /// </summary>
    [Dependency(ServiceLifetime.Scoped, AddSelf = true)]
    public class ScopedDictionary : ConcurrentDictionary<string, object>, IDisposable
    {


        public AuditChangeEntry AuditLog { get; set; }
        public void Dispose()
        {
            AuditLog = null;
            this.Clear();
        }
    }
}
